/*
 * @Descripttion:
 * @version:
 * @Author: HuA
 * @Date: 2022-10-13 17:01:33
 * @LastEditors: HuA
 * @LastEditTime: 2022-10-13 17:04:33
 */
import { queryInfo } from '@/api/infoComment'

export default {
  namespaced: true,
  state: {
    // 声明数据
    infos: []
  },
  mutations: {
    // 声明突变
    SET_INFO(state, payload) {
      state.infos = payload
    }
  },
  actions: {
    // 查询咨询评论
    async queryInfos({ commit }, params) {
      const res = await queryInfo(params)
      // console.log(res); // res.data.list[]是我们需要的数组
      commit('SET_INFO', res.data.list)
    }
  }
}
